home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / world / blur2 / blur2.wrl < prev   
Text File  |  1996-10-17  |  2KB  |  102 lines

  1. #VRML V2.0 utf8
  2. #
  3. # "Blur Effect" with one blur object
  4. #     created by ask@krc.sony.co.jp (Masamichi zzzcat Asukai)
  5. #
  6. # Copyright(C) 1996 Sony Corporation. All rights reserved.
  7. #
  8.  
  9. Viewpoint {
  10.     position 0.0 0.0 30.0
  11. }
  12.  
  13. Background {
  14.     skyColor 0.5 0.3 0.7
  15. }
  16.  
  17. DEF REALOBJ Transform {
  18.     translation -10.0 0.0 0.0
  19.     children[
  20.         Shape {
  21.             appearance Appearance {
  22.                 material Material {
  23.                     ambientIntensity 0.0
  24.                     diffuseColor 0.4 0.6 0.5
  25.                     emissiveColor 0.2 0.3 0.25
  26.                     transparency 0.0
  27.                 }
  28.             }
  29.             geometry Cube{}
  30.                }
  31.     ]
  32. }
  33.  
  34. DEF TIME1 TimeSensor{
  35.     cycleInterval 5.0
  36.     stopTime -1
  37.     loop TRUE
  38. }
  39.  
  40. DEF POSINT PositionInterpolator{
  41.     set_fraction 0.5
  42.     key [0, 0.2, 0.3, 0.5, 0.7, 0.8, 1]
  43.     keyValue [-10 0 0, -6 0 0, 6 0 0, 10 0 0, 6 0 0, -6 0 0, -10 0 0]
  44. }
  45.  
  46. DEF SCLINT PositionInterpolator{
  47.     set_fraction 0.5
  48.     key [0, 0.2, 0.3, 0.5, 0.7, 0.8, 1]
  49.     keyValue [1 1 1, 1 1 1, 3 3 3, 3 3 3, 3 3 3, 1 1 1, 1 1 1]
  50. }
  51.  
  52. DEF ROTINT OrientationInterpolator{
  53.     set_fraction 0.5
  54.     key [0, 0.2, 0.3, 0.5, 0.7, 0.8, 1]
  55.     keyValue [0 1 0 0.0, 0 1 0 0.0, 0 1 0 1.57, 0 1 0 1.57, 0 1 0 1.57, 0 1 0 3.14, 0 1 0 3.14]
  56. }
  57.  
  58. ROUTE TIME1.fraction_changed TO POSINT.set_fraction
  59. ROUTE TIME1.fraction_changed TO SCLINT.set_fraction
  60. ROUTE TIME1.fraction_changed TO ROTINT.set_fraction
  61. ROUTE POSINT.value_changed TO REALOBJ.set_translation
  62. ROUTE SCLINT.value_changed TO REALOBJ.set_scale
  63. ROUTE ROTINT.value_changed TO REALOBJ.set_rotation
  64.  
  65.  
  66. DEF BLUROBJ Transform {
  67.     translation -10.0 0.0 0.0
  68.     children[
  69.         Shape {
  70.             appearance Appearance {
  71.                 material Material {
  72.                     ambientIntensity 0.0
  73.                     diffuseColor 0.4 0.6 0.5
  74.                     emissiveColor 0.2 0.3 0.25
  75.                     transparency 0.5
  76.                 }
  77.             }
  78.             geometry Cube{}
  79.                }
  80.     ]
  81. }
  82.  
  83. DEF TIME2 TimeSensor{
  84.     cycleInterval 0.05
  85.     stopTime -1
  86.     loop TRUE
  87. }
  88.  
  89. DEF SCRIPT Script {
  90.     url "blur2.class"
  91.     eventIn SFTime interval
  92.     eventOut SFVec3f setTranslation
  93.     eventOut SFVec3f setScale
  94.     eventOut SFRotation setRotation
  95.     field SFNode realobj USE REALOBJ
  96.  
  97. ROUTE TIME2.cycleTime TO SCRIPT.interval
  98. ROUTE SCRIPT.setTranslation TO BLUROBJ.set_translation
  99. ROUTE SCRIPT.setScale TO BLUROBJ.set_scale
  100. ROUTE SCRIPT.setRotation TO BLUROBJ.set_rotation
  101.